package com.hx.Dao;

import com.hx.DBUtlis;
import com.hx.entity.Countries;
import org.hibernate.Query;
import org.hibernate.Session;

import java.util.List;

public class CountryDao extends DBUtlis<Countries> {
    @Override
    public List<Countries> findAll() {
        Session session=super.getSessionFactory().getCurrentSession();
        session.beginTransaction();
        Query q =session.createQuery("from Countries where regionId=2");
        return q.list();
    }
}
